package org.compiere.acct;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.ArrayList;

import org.compiere.model.MAcctSchema;
import org.compiere.model.MReconciliationAct;
import org.compiere.model.Mhrmpayment;
import org.compiere.model.X_C_DocType;
import org.compiere.util.Env;

public class Doc_FIReconciliationAct extends Doc {

	Doc_FIReconciliationAct(MAcctSchema[] ass, Class<?> clazz, ResultSet rs,
			String defaultDocumentType, String trxName) {
		super(ass, clazz, rs, defaultDocumentType, trxName);
	}
	
	public Doc_FIReconciliationAct(MAcctSchema[] ass, ResultSet rs, String trxName)
	{
		super (ass, MReconciliationAct.class, rs, X_C_DocType.DOCBASETYPE_FIReconciliationAct, trxName);
	}	//	Doc_Invoice

	@Override
	protected String loadDocumentDetails() {
		return null;
	}

	@Override
	public BigDecimal getBalance() {
		BigDecimal retValue = Env.ZERO;
		StringBuffer sb = new StringBuffer (" [");
		//  Total
		retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross));
		sb.append(getAmount(Doc.AMTTYPE_Gross));
		//  - Header Charge
		retValue = retValue.subtract(getAmount(Doc.AMTTYPE_Charge));
		sb.append("-").append(getAmount(Doc.AMTTYPE_Charge));
		log.fine(toString() + " Balance=" + retValue + sb.toString());
		return retValue;
	}

	@Override
	public ArrayList<Fact> createFacts(MAcctSchema as) {
		ArrayList<Fact> result = new ArrayList<Fact>(); 
		return result;
	}

}
